Conversation
There was a problem hiding this comment.
Sorry @LIghtJUNction, your pull request is larger than the review limit of 150000 diff characters
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors AstrBot's core architecture by modularizing tool management and improving the robustness of tool execution. It streamlines the integration of various tools, enhances the dashboard's configurability, and ensures more predictable behavior for LLM interactions. These changes contribute to a more maintainable, extensible, and user-friendly system. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and well-executed refactoring of the tool management system, centered around a new ToolProvider protocol. This change decouples tool registration from the main agent logic, greatly enhancing modularity and making the system more extensible. Key improvements include the introduction of ComputerToolProvider and CronToolProvider, a new sandbox capability check to prevent the use of browser tools in unsupported environments, and deterministic tool serialization to improve caching. The command-line interface and dashboard have also been substantially improved, offering better configuration options like a backend-only mode and flexible API URL settings. Overall, these changes represent a major architectural improvement, increasing the robustness, safety, and maintainability of the codebase. The implementation is solid, and I have no specific issues to raise.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- Fixed '_GeneratorContextManager' error in pip_installer.py by using synchronous 'with' for constraints_file(). - Fixed 'CoroutineType' has no attribute 'is_file' in dashboard/routes/config.py by adding missing await. - Fixed undefined names (Group, ComponentTypes, File, Reply, At) in aiocqhttp_platform_adapter.py. - Added 'pytest-cov' for code coverage testing.
- 将 Rust 核心从 astrbot/rust/ 迁移至 rust/ - 新增 a2a.rs: Agent-to-Agent 通信协议 - 新增 abp.rs: ABP 插件协议客户端 - 新增 server.rs: WebSocket/HTTP 服务器 - 更新 Cargo.toml 依赖 (futures-util) - 重构 config.rs, orchestrator.rs, protocol.rs 等核心模块
- 更新 .env.example 环境变量示例 - 更新 pyproject.toml 依赖配置 - 删除 tui 相关命令 (cmd_tui.py, cmd_run_tui.py) - 更新 CLI i18n 和核心模块 - 删除 tombi.toml
- 采用 master 的 README 多语言版本和文档更新 - 采用 dev 版本号 (4.25.0) + master 的 Python 版本限制 (<3.14) - 采用 master 的 _image_ref_to_data_url 图片处理实现 - 从 git 中移除 MDI 字体二进制文件,改由脚本生成 - 其他冲突均采用 master 版本
- Add ABP (AstrBot Plugin) protocol Python package (astrbot/core/plugin/) - PluginManager for plugin lifecycle management - PluginClient for out-of-process plugin communication - Transport layer (Stdio, Unix Socket, HTTP) - Data models and constants - Add ABP error codes to Rust error.rs (-32700 to -32211) - Fix Rust server.rs compilation issues - Fix UNIX_EPOODY typo - Fix mutable borrow issues - Fix API response type mismatches - Update _core.pyi type stubs with ABP types - Add openspec change archive for ABP protocol implementation
- 静态导入 useCustomizerStore 替代动态导入 - useApiStore() 不再传入 pinia 实例 - 使用 theme.change() 替代 deprecated 的 theme.global.name.value
- Options API → Composition API (ref 替代 state) - 增加 isUnmounted 防止组件卸载后继续创建 SSE 连接 - 增加 TypeScript 类型注解
- VerticalHeader 添加 onBeforeUnmount 钩子 - common store 添加 isUnmounted 标志防止卸载后继续重连
- 添加 isUnmounted 标志 - 在 和生命周期钩子中检查该标志
- ConsoleDisplayer 添加 isUnmounted 标志 - ReadmeDialog 添加 btn.parentNode null 检查
Vue Router 4 已弃用 next() 回调,改为直接返回值
添加 mdi-share-variant 图标
- ProviderSourcesPanel 添加可选链 item.raw?.icon - ChangelogDialog 和 useProviderSources 的 console.error 改为 console.warn
- 添加实现状态表格 - 更新配置规范 - 添加新的协议规范
- tool.py: 重构 openai_schema 避免 dict[str, str] 类型推断问题 - openai_source.py: 使用 getattr 安全访问 tool_call.function - 解决 origin/dev 中的合并冲突
Feature: persona export/import support (#4409) Conflicts resolved: - dashboard/src/i18n/locales/en-US/features/persona.json: merged buttons (clone, addDialogPair, import) - dashboard/src/i18n/locales/zh-CN/features/persona.json: merged buttons (clone, addDialogPair, import) - dashboard/src/views/persona/PersonaCard.vue: merged emits (clone + export both preserved) - dashboard/src/views/persona/PersonaManager.vue: merged template (import toolbar button + clone handler), merged methods (importPersona + clonePersona both mapped) Also adds export error i18n key for both zh-CN and en-US locales.
…ize error `abort_signal` (asyncio.Event) is passed via **kwargs into payloads during tool_call streaming, causing "Object of type Event is not JSON serializable" when the OpenAI client tries to serialize the request body. Regression test added: test_prepare_chat_payload_strips_non_json_serializable_kwargs
This pull request introduces a new workflow for deploying the dashboard to GitHub Pages and makes significant improvements to the
README.mdfor clarity, completeness, and consistency. It also includes minor formatting updates to the smoke test workflow and adds some convenience commands to.envrc.Summary of changes:
README.mdwith clearer descriptions, updated instructions, improved platform/model tables, and better contribution guidelines.Dashboard Deployment Automation
.github/workflows/deploy-dashboard.ymlto automate daily and manual dashboard builds and deployments to GitHub Pages, including build, artifact upload, and deployment steps.Documentation Improvements
README.md: clearer project description, improved feature list, updated deployment instructions, revised supported platforms/models tables, and enhanced contribution guidelines. [1] [2] [3] [4] [5]Workflow Consistency
.github/workflows/smoke_test.ymlto use consistent YAML quoting, improved comments, and clarified Python version formatting. [1] [2] [3]Developer Convenience
git pullandgit statuscommands to.envrcfor easier environment setup and status checking.